<%@ page import="java.util.List" %>
<%@ page import="com.domain.User" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta charset="utf-8">
    <title>评论</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/AdminLTE.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pagination.css">
    <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
    <script src="${pageContext.request.contextPath}/js/pagination.js"></script>
    <script src="${pageContext.request.contextPath}/js/my.js"></script>
</head>

<body class="hold-transition skin-red sidebar-mini">

<!-- .box-body -->
<div class="box-header with-border">
    <h3 class="box-title">查阅评论！</h3>
</div>
<div class="box-tools pull-right-container">
    <div class="has-feedback">
        <form action="${pageContext.request.contextPath}/comments/search" method="post">
            图书名称：<input name="book_name" id="book_name">
            <input class="btn btn-default" type="submit" value="查询">
        </form>
    </div>
</div>
<div class="bottom-right">
    <form action="${pageContext.request.contextPath}/comments/search" method="post">
        图书评论：<select  style="width:160px" size="1px" id="comment_content" name="comment_content" >
            <option value="好评">好评</option>
            <option value="好">好</option>
            <option value="一般">一般</option>
            <option value="差">差</option>
            <option value="非常差">非常差</option>
        </select>
        <input class="btn btn-default" type="submit" value="查询">
    </form>
</div>
        <!-- 数据表格 -->
        <table id="dataList" class="table table-bordered table-striped table-hover dataTable text-center">
            <thead>
            <tr>
                <th class="sorting_asc">书名</th>
                <th class="sorting"></th>
                <th class="sorting"></th>
                <th class="sorting">评论内容</th>
                <th class="sorting"></th>
                <th class="sorting">发表时间</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${list}" var="comments">
                <tr>
                    <td> ${comments.book.name}</td>
                    <td></td>
                    <td></td>
                    <td>${comments.comments.comment_content}</td>
                    <td></td>
                    <td>${comments.comments.comment_date}</td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div id="pagination" class="pagination"></div>
    </div>
    <!--数据列表/-->
</div>

<%--<!-- 添加和编辑图书的模态窗口-->--%>
<%--<div class="modal fade" id="addOrEditModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"--%>
<%--     aria-hidden="true">--%>
<%--    <div class="modal-dialog">--%>
<%--        <div class="modal-content">--%>
<%--            <div class="modal-header">--%>
<%--                <h3 id="myModalLabel">留言</h3>--%>
<%--            </div>--%>
<%--            <div class="modal-body">--%>
<%--                <form id="addOrEditMessage">--%>
<%--                    <table id="addOrEditTab" class="table table-bordered table-striped" width="800px">--%>
<%--                        &lt;%&ndash;图书的id,不展示在页面&ndash;%&gt;--%>
<%--                        <td>建议分类</td>--%>
<%--                        <td>--%>
<%--                            <select class="form-control" name="messagesort"id="emmessagesort">--%>
<%--                                <option value="书籍相关">书籍相关</option>--%>
<%--                                <option value="设备相关">设备相关</option>--%>
<%--                                <option value="人员相关">人员相关</option>--%>
<%--                                <option value="其他">其他</option>--%>
<%--                            </select>--%>
<%--                        </td>--%>
<%--                        <td>建议内容</td>--%>
<%--                        <td><input class="form-control" placeholder="留言内容" name="messagecontent" id="emmessagecontent"></td>--%>
<%--                            </tr>--%>
<%--                    </table>--%>
<%--                </form>--%>
<%--            </div>--%>
<%--            <div class="modal-footer">--%>
<%--                <button class="btn btn-success" data-dismiss="modal" aria-hidden="true"  onclick="addOrEditMessage()">保存--%>
<%--                </button>--%>
<%--                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>--%>
<%--            </div>--%>
<%--        </div>--%>
<%--    </div>--%>
<%--</div>--%>
</body>
</html>